import 'package:flutter/cupertino.dart';

/// 自定义路由,没有动画的路由跳转
class NoAnimRouteBuilder extends PageRouteBuilder {
  final Widget page;

  NoAnimRouteBuilder(this.page)
      : super(
            opaque: false, //是否透明
            pageBuilder: (context, animation, secondaryAnimation) => page,// 页面初始化
            transitionDuration: Duration(microseconds: 0), //跳转过渡持续时间
            transitionsBuilder:
                (context, animation, secondaryAnimation, child) => child); //过渡初始化
}
